package com.hy.mydesktop.client.component.mvc.factory;

import com.extjs.gxt.ui.client.mvc.Controller;
import com.hy.mydesktop.client.component.mvc.factory.util.ControllerFactoryUtil;
import com.hy.mydesktop.client.mvc.form.combobox.ComboBoxController;
import com.hy.mydesktop.client.mvc.form.combobox.SimpleComboBoxController;
import com.hy.mydesktop.shared.persistence.domain.gxt.GxtComponentControllerMetaNodeModel;

public class SimpleComboBoxControllerFactory {

	public static Controller createSimpleComboBoxController(
			GxtComponentControllerMetaNodeModel gxtComponentMetaNodeModel) {
		return configureComboBox(gxtComponentMetaNodeModel);

	}

	private static Controller configureComboBox(GxtComponentControllerMetaNodeModel gxtComponentMetaNodeModel){
			
		SimpleComboBoxController simpleComboBoxController = createDefaultSimpleComboBoxController();
			return ControllerFactoryUtil.configureWindow(simpleComboBoxController, gxtComponentMetaNodeModel);
	}
	
	private static SimpleComboBoxController createDefaultSimpleComboBoxController(){
		SimpleComboBoxController simpleComboBoxController = new SimpleComboBoxController();
		
		return simpleComboBoxController;
	}
}
